package com.apex.restful.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-4-7
 */
@Entity
/*@JsonIgnoreProperties({"field01", "field02", "field03", "field04",
        "field05", "field06", "field07", "field08", "field09", "field10", "field11"
        , "field12", "field13", "field14", "field15", "field16", "field17"
        , "field18", "field19", "field20"})*/
@Table(name = "MessageApprove")
public class MessageApprove {
    private Integer messageId;
    private Integer moduleTypeId;
    private String moduleTypeName;
    private String messageTitle;
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8")
    private Date beginTime;
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8")
    private Date endTime;
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8")
    private Date sendTime;
    private String sendUserCode;
    private String messageHtml;
    private String messageFileName;
    private String fileType;
    private String keyWord;
    private Integer isPhoto;
    private Integer photoId;
    private String messageArea;
    private String messageType;
    private Integer isScroll;
    private Integer scrollDay;
    private Integer instancy;
    private String attendment;
    private Integer number;
    private Integer approveFLag;
    private Integer delFlag;
    private Integer publishOut;
    private Integer importGrade;
    private String publishDept;
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8")
    private Date approveTime;
    private String approveMan;
    private Integer anonymity;
    private String selquarters;
    private String seldept;
    private Integer isCopy;
    private String realitySelDept;

    @Id
    @Column(name = "MessageID")
    public Integer getMessageId() {
        return messageId;
    }

    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }

    @Basic
    @Column(name = "ModuleTypeID")
    public Integer getModuleTypeId() {
        return moduleTypeId;
    }

    public void setModuleTypeId(Integer moduleTypeId) {
        this.moduleTypeId = moduleTypeId;
    }

    @Basic
    @Column(name = "ModuleTypeName")
    public String getModuleTypeName() {
        return moduleTypeName;
    }

    public void setModuleTypeName(String moduleTypeName) {
        this.moduleTypeName = moduleTypeName;
    }

    @Basic
    @Column(name = "MessageTitle")
    public String getMessageTitle() {
        return messageTitle;
    }

    public void setMessageTitle(String messageTitle) {
        this.messageTitle = messageTitle;
    }

    @Basic
    @Column(name = "BeginTime")
    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    @Basic
    @Column(name = "EndTime")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "SendTime")
    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    @Basic
    @Column(name = "SendUserCode")
    public String getSendUserCode() {
        return sendUserCode;
    }

    public void setSendUserCode(String sendUserCode) {
        this.sendUserCode = sendUserCode;
    }

    @Basic
    @Column(name = "MessageHTML")
    public String getMessageHtml() {
        return messageHtml;
    }

    public void setMessageHtml(String messageHtml) {
        this.messageHtml = messageHtml;
    }

    @Basic
    @Column(name = "MessageFileName")
    public String getMessageFileName() {
        return messageFileName;
    }

    public void setMessageFileName(String messageFileName) {
        this.messageFileName = messageFileName;
    }

    @Basic
    @Column(name = "FileType")
    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    @Basic
    @Column(name = "KeyWord")
    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    @Basic
    @Column(name = "IsPhoto")
    public Integer getIsPhoto() {
        return isPhoto;
    }

    public void setIsPhoto(Integer isPhoto) {
        this.isPhoto = isPhoto;
    }

    @Basic
    @Column(name = "PhotoId")
    public Integer getPhotoId() {
        return photoId;
    }

    public void setPhotoId(Integer photoId) {
        this.photoId = photoId;
    }

    @Basic
    @Column(name = "MessageArea")
    public String getMessageArea() {
        return messageArea;
    }

    public void setMessageArea(String messageArea) {
        this.messageArea = messageArea;
    }

    @Basic
    @Column(name = "MessageType")
    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    @Basic
    @Column(name = "IsScroll")
    public Integer getIsScroll() {
        return isScroll;
    }

    public void setIsScroll(Integer isScroll) {
        this.isScroll = isScroll;
    }

    @Basic
    @Column(name = "ScrollDay")
    public Integer getScrollDay() {
        return scrollDay;
    }

    public void setScrollDay(Integer scrollDay) {
        this.scrollDay = scrollDay;
    }

    @Basic
    @Column(name = "Instancy")
    public Integer getInstancy() {
        return instancy;
    }

    public void setInstancy(Integer instancy) {
        this.instancy = instancy;
    }

    @Basic
    @Column(name = "Attendment")
    public String getAttendment() {
        return attendment;
    }

    public void setAttendment(String attendment) {
        this.attendment = attendment;
    }

    @Basic
    @Column(name = "Number")
    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    @Basic
    @Column(name = "ApproveFLag")
    public Integer getApproveFLag() {
        return approveFLag;
    }

    public void setApproveFLag(Integer approveFLag) {
        this.approveFLag = approveFLag;
    }

    @Basic
    @Column(name = "DelFlag")
    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "PublishOut")
    public Integer getPublishOut() {
        return publishOut;
    }

    public void setPublishOut(Integer publishOut) {
        this.publishOut = publishOut;
    }

    @Basic
    @Column(name = "ImportGrade")
    public Integer getImportGrade() {
        return importGrade;
    }

    public void setImportGrade(Integer importGrade) {
        this.importGrade = importGrade;
    }

    @Basic
    @Column(name = "PublishDept")
    public String getPublishDept() {
        return publishDept;
    }

    public void setPublishDept(String publishDept) {
        this.publishDept = publishDept;
    }

    @Basic
    @Column(name = "ApproveTime")
    public Date getApproveTime() {
        return approveTime;
    }

    public void setApproveTime(Date approveTime) {
        this.approveTime = approveTime;
    }

    @Basic
    @Column(name = "ApproveMan")
    public String getApproveMan() {
        return approveMan;
    }

    public void setApproveMan(String approveMan) {
        this.approveMan = approveMan;
    }

    @Basic
    @Column(name = "Anonymity")
    public Integer getAnonymity() {
        return anonymity;
    }

    public void setAnonymity(Integer anonymity) {
        this.anonymity = anonymity;
    }

    @Basic
    @Column(name = "selquarters")
    public String getSelquarters() {
        return selquarters;
    }

    public void setSelquarters(String selquarters) {
        this.selquarters = selquarters;
    }

    @Basic
    @Column(name = "seldept")
    public String getSeldept() {
        return seldept;
    }

    public void setSeldept(String seldept) {
        this.seldept = seldept;
    }

    @Basic
    @Column(name = "IsCopy")
    public Integer getIsCopy() {
        return isCopy;
    }

    public void setIsCopy(Integer isCopy) {
        this.isCopy = isCopy;
    }

    @Basic
    @Column(name = "RealitySelDept")
    public String getRealitySelDept() {
        return realitySelDept;
    }

    public void setRealitySelDept(String realitySelDept) {
        this.realitySelDept = realitySelDept;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MessageApprove that = (MessageApprove) o;
        return Objects.equals(messageId, that.messageId) &&
                Objects.equals(moduleTypeId, that.moduleTypeId) &&
                Objects.equals(moduleTypeName, that.moduleTypeName) &&
                Objects.equals(messageTitle, that.messageTitle) &&
                Objects.equals(beginTime, that.beginTime) &&
                Objects.equals(endTime, that.endTime) &&
                Objects.equals(sendTime, that.sendTime) &&
                Objects.equals(sendUserCode, that.sendUserCode) &&
                Objects.equals(messageHtml, that.messageHtml) &&
                Objects.equals(messageFileName, that.messageFileName) &&
                Objects.equals(fileType, that.fileType) &&
                Objects.equals(keyWord, that.keyWord) &&
                Objects.equals(isPhoto, that.isPhoto) &&
                Objects.equals(photoId, that.photoId) &&
                Objects.equals(messageArea, that.messageArea) &&
                Objects.equals(messageType, that.messageType) &&
                Objects.equals(isScroll, that.isScroll) &&
                Objects.equals(scrollDay, that.scrollDay) &&
                Objects.equals(instancy, that.instancy) &&
                Objects.equals(attendment, that.attendment) &&
                Objects.equals(number, that.number) &&
                Objects.equals(approveFLag, that.approveFLag) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(publishOut, that.publishOut) &&
                Objects.equals(importGrade, that.importGrade) &&
                Objects.equals(publishDept, that.publishDept) &&
                Objects.equals(approveTime, that.approveTime) &&
                Objects.equals(approveMan, that.approveMan) &&
                Objects.equals(anonymity, that.anonymity) &&
                Objects.equals(selquarters, that.selquarters) &&
                Objects.equals(seldept, that.seldept) &&
                Objects.equals(isCopy, that.isCopy) &&
                Objects.equals(realitySelDept, that.realitySelDept);
    }

    @Override
    public int hashCode() {

        return Objects.hash(messageId, moduleTypeId, moduleTypeName, messageTitle, beginTime, endTime, sendTime, sendUserCode, messageHtml, messageFileName, fileType, keyWord, isPhoto, photoId, messageArea, messageType, isScroll, scrollDay, instancy, attendment, number, approveFLag, delFlag, publishOut, importGrade, publishDept, approveTime, approveMan, anonymity, selquarters, seldept, isCopy, realitySelDept);
    }
}
